﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using xhim.common.Api;

namespace xhim.common.Exceptions
{
    public class ApiException : Exception
    {

        private ApiResultModel _apiResultModel;



        public ApiException() { }
        public ApiException(ApiResultModel apiResultModel)
        {
            _apiResultModel = apiResultModel;
        }
        public ApiException(string message) : base(message)
        {
            //throw new Exception(message);
            Debug.WriteLine(message);

            //throw this;
        }

        public ApiException(string message, Exception innerException) : base(message, innerException)
        {

        }


        public ApiResultModel ApiResult { get { return _apiResultModel; } }
    }
}
